home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 43.zip / Lattice Compiler disk 1.adf / voorbeeld2.c < prev   
C/C++ Source or Header  |  1988-09-13  |  473b  |  28 lines

  1. #include "stdio.h"
  2. #include "fcntl.h"
  3. main()
  4. {
  5.  
  6. int count,file,mode,lengte,status,success,input,output;
  7. char  string[255],*buffer;
  8. count = 0;
  9. lengte = 1;
  10. file = open("ser:",O_RDWR);
  11. while(5<6){
  12. status = read(file,buffer,lengte);
  13. while (*buffer != '\n'){
  14. string[count] = *buffer;
  15. status = read(file,buffer,lengte);
  16. status = write(file,buffer,lengte);
  17. count ++;
  18. }
  19. string[count] = '\0';
  20. input = 0;
  21. output = 0;
  22. printf("%s",string);
  23. Execute(string,input,output);
  24. count =0;
  25. }
  26. }
  27.  
  28.